package com.wanmait.schedule.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author wanmait
 * @since 2022-03-02
 */
@Data
@Accessors(chain = true)
public class Department {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 企业id
     */
    private Integer companyId;

    @TableField(exist = false)
    private Company company;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 是否可用(0为可用，1为不可用)
     */
    @TableField
    private Boolean enable;

    /*
    * 属于此部门的成员
    * */
    @TableField(exist = false)
    private List<CompanyUser> companyUserList;


}
